﻿using Camc.Quality.RecordTable.FormBase;
using Camc.Quality.RecordTable.FormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.RecordTable.FormEntity
{
    public class 爆索尺寸测量记录表 : TableBase
    {
        public 爆索尺寸测量记录表(int serialNum, Guid workStepEntityId, Guid processesEntityId, int sort, string toolUsed)
        {
            SerialNum = serialNum;
            WorkStepEntityId = workStepEntityId;
            ProcessesEntityId = processesEntityId;
            Sort = sort;

            ToolUsed = toolUsed;
        }
        public override string FormName { get; protected set; } = "爆索尺寸测量记录表";

        public override string ToolUsed_DisplayName { get; protected set; } = "所用仪器编号";
        public override bool ToolUsed_Show { get; protected set; } = true;
        public override bool ToolUsed_Enable { get; protected set; } = true;

        public RecordRequirementsEntity SetRecordRequirements(RecordRequirementsEntity entity,string recordLocation)
        {
            entity.SetRecordLocation(recordLocation, "记录位置", false, true, 0);
            return entity;
        }
        public MeasuredResultEntity SetMeasuredResult(MeasuredResultEntity entity,string firstMeasuredValues, string secondMeasuredValues, string thirdMeasuredValues)
        {
            entity.SetFirstMeasuredValues(firstMeasuredValues, "扁平（mm）", true, true, 0);
            entity.SetSecondMeasuredValues(secondMeasuredValues, "宽度（mm）", true, true, 0);
            entity.SetThirdMeasuredValues(thirdMeasuredValues, "总长（mm）", true, true, 0);
            return entity;
        }
        /// <summary>
        /// 插入环境要素
        /// </summary>
        public EnvironmentEntity SetEnvironment(EnvironmentEntity entity,string temperature, string humidity)
        {
            entity.SetTemperature(temperature, "温度", true, true, 2);
            entity.SetHumidity(humidity, "湿度", true, true, 2);
            return entity;
        }
    }
}
